home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Apps / DevTools / eText5 / Source / NewXTeXT / XText0.9beta2 / XText.subproj / XText0.h < prev    next >
Encoding:
Text File  |  1995-07-28  |  1.8 KB  |  59 lines

  1. /*    This file is part of XText (version 0.9)
  2.     Paul Griffin July 1995 No copyright.  Use at your own discretion. 
  3.     
  4.     Based on XText 0.8
  5.     Mike Dixon, April 1992    
  6.     Copyright (c) 1992 Xerox Corporation.  All rights reserved.
  7.  
  8. */
  9.  
  10. #import <appkit/Text.h>
  11.  
  12. /*    XText0 is the 'bare' extensible Text class; it provides the support for
  13.     key bindings, but doesn't provide any of the useful methods you're likely
  14.     to want to bind them to.
  15.  
  16.     The instance variables are
  17.         nextAction        the action that will interpret the next key
  18.         initialAction    the basic action used to interpret keys (generally
  19.                         an XTDispatchAction)
  20.         errorStream        used to report errors
  21.  
  22.     In normal operation nextAction == initialAction, but an action may
  23.     change nextAction to cause the next key to be interpreted specially.
  24.     For example, this is used to implement ctrl-q (quote next char), and
  25.     could also be used to implement emacs-style prefix maps.
  26.  
  27.     Most of the methods are all self-explanatory;  the ones that might not
  28.     be are
  29.         newFieldEditorFor:initialAction:estream:
  30.                                 should be called from a window's delegate's
  31.                                 getFieldEditor:for: method; returns an XText
  32.                                 for editing the window's fields
  33.         unboundKey                just beeps
  34.         disableAutodisplay        like setAutodisplay:NO, except that it does
  35.                                 nothing if this is a field editor (to work
  36.                                 around a bug in text fields)
  37.  
  38.     The default initialAction is nil, which just causes all key events to
  39.     be handled by the superclass (i.e. Text).
  40. */
  41.  
  42. @interface XText0:Text
  43. {
  44.     id nextAction;
  45.     id initialAction;
  46.     id errorStream;
  47. }
  48. + newFieldEditorFor:win initialAction:action estream:errs;
  49. - initFrame:(const NXRect *)frameRect text:(const char *)theText
  50.     alignment:(int)mode;
  51. - setErrorStream:errs;
  52. - errorStream;
  53. - setInitialAction:action;
  54. - initialAction;
  55. - setNextAction:action;
  56. - unboundKey;
  57. - disableAutodisplay;
  58. @end
  59.